#include "junix.h"

int
main(int argc, char **argv)
{
    struct protoent *ppo;

    ppo = getprotobyname(argv[1]);

    if(!ppo)
        err_quit("Not fount");

    fprintf(stdout,"p_name:%s\n", ppo->p_name);
    char **aliases = ppo->p_aliases;
    while(*aliases)
        fprintf(stdout,"p_aliases:%s\n", *aliases++);

    printf("p_proto:%d\n", ppo->p_proto);
            
    exit(0);
}

